package com.dlz.systemshop.service.impl;

import com.dlz.systemshop.mapper.CategoryMapper;
import com.dlz.systemshop.pojo.Category;
import com.dlz.systemshop.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    private CategoryMapper categoryMapper;
    @Override
    public List<Category> findAll() {
        return categoryMapper.findAll();
    }

    @Override
    public Category findByid(int id) {
        return categoryMapper.findByid(id);
    }

    @Override
    public void deleteById(int id) {
        categoryMapper.deleteById(id);
    }

    @Override
    public void save(Category category) {
        categoryMapper.save(category);
    }

    @Override
    public void update(Category category) {
        categoryMapper.update(category);
    }


}
